package com.xjm.entity.model;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author xjm
 * @since 2025-02-28
 */
@Data
@TableName("themes")
public class ThemesModel implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 专题标题
     */
    private String title;

    /**
     * 专题副标题
     */
    private String subtitle;

    /**
     * 专题描述
     */
    private String description;

    /**
     * 专题封面图
     */
    private String image;

    /**
     * 专题横幅图
     */
    private String bannerImage;

    /**
     * 1:显示 0:隐藏
     */
    private Integer status;

    @TableField(exist = false)
    private List<Integer> productIds;

    @TableField(exist = false)
    private List<ProductsModel> productsModels;

    /**
     * 排序
     */
    private Integer sortOrder;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.UPDATE)
    private Date updatedTime;
}
